package com.bgIntlgn.client.entity.warehourse;

import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 记录出入库记录
 * 
 * @author yuhui
 * 
 */
@Table(name = "storage_bill_records", constrain = "")
public class StorageBillRecord implements Bean {

	/**
	 * 对应的库存记录。
	 */
	@Field(name = "bill_id", type = "int8", constrain = " not null references storage_bills(id) on update cascade on delete cascade")
	private Long billId;

	/**
	 * 库存量显示时用 Element.id
	 */
	@Field(name = "uid", type = "char(80)", constrain = " not null references element_subversions(uid) on update cascade on delete cascade")
	private String uid;

	/**
	 * 总数量, 数量可正可负
	 */
	@Field(name = "quantity", type = "int", constrain = "not null default 0")
	private Integer quantity;

	/**
	 * 单价.
	 */
	@Field(name = "money", type = "numeric(11,3)", constrain = "default 0.0")
	private Double money;

	/**
	 * 货架
	 */
	@Field(name = "shelf", type = "varchar(100)", constrain = "")
	private String shelf;

	/**
	 * 来源单据的流水号<BR>
	 * <ul>
	 * <li>采购入库时， 指向采购单流水号</li>
	 * <li>生产入库时， 指向对应的生产计划单流水号</li>
	 * </ul>
	 */
	@Field(name = "source_serial_nu", type = "varchar(80)", constrain = "")
	private String sourceSerialNu;

	public Long getBillId() {
		return this.billId;
	}

	public void setBillId(Long billId) {
		this.billId = billId;
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Double getMoney() {
		return this.money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public String getShelf() {
		return shelf;
	}

	public void setShelf(String shelf) {
		this.shelf = shelf;
	}

	public String getSourceSerialNu() {
		return this.sourceSerialNu;
	}

	public void setSourceSerialNu(String sourceSerialNu) {
		this.sourceSerialNu = sourceSerialNu;
	}

}
